/*
* tell browser
* current running environment
* */

const { system_obj_urls } = require('../config/api.conf');

const checkCurrentEnv = (req, res, next) => {
    res.cookie('CURRENT_ENV', process.env.NODE_ENV, {
        path: '/',
        maxAge: 24*60*60*1000 // 1 day
    });

    res.system_obj_urls = system_obj_urls || {};

    next()
};

module.exports = checkCurrentEnv;